---
title: "Accept subscription information from third-party subscription engine"
method: POST
path: "/v1/shoppers/me/carts/active (subscriptionInfo)"
tags: ["Third Party Subscription Engine Support"]
---

# Accept subscription information from third-party subscription engine

`POST /v1/shoppers/me/carts/active (subscriptionInfo)`

Accept Subscription Information (Including Billing Agreements) for supporting third-party subscription engine.

Use ECO billing optimization tool for third-party subscription engine.

## Request body

- SubscriptionExternalEngineRequest
  - `cart` object
    - `lineItems` object
      - `lineItem` object
        - `quantity` string
        - `product` object
          - `id` string
        - `subscriptionInfo` object — Basic subscription information related data from an external subscription engine.
          - `autoRenewal` boolean — If true indicates that renewals for this subscription is auto-renewal (as opposed to manual).
          - `terms` string — The terms to the customer for recurring purchases.
          - `freeTrial` boolean — If true indicates this subscription is a free trial.
          - `startTime` string — The start date of subscription in ISO 8601 format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
          - `endTime` string — The end date of subscription in ISO 8601 format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
          - `billingAgreementId` string — Digital River billing agreement ID. It represents the terms the customer agreed to when they stored their card details or chose to apply them to any kind of recurring purchase. The ID of the agreement can then be referenced for subsequent purchases, which gives us the ability to tie them together.
        - `billingOptimization` object — Use the ECO (Expired Card Optimizer) billing optimization tool for a 3rd party subscription.
          - `subscriptionId` string — The ID of the subscription.
          - `segmentId` string — Segment Id of each renewal. Unique for each renewal term, should change after every renewal. The initial acquisition could be thinking as "1" ( thought it doesn’t matter much in initial acquisition), then each renewal thereafter increment from “2” upwards would work. As long as segmentId is the unique id representing each renewal term.
          - `renewalAttempNumber` number — Billing attempt number for current renewal, should reset to 1 after every successful renewal.
    - `chargeType` string — When using external subscription engine (non-Digital River subscription engine), use this field to specify the charge type of your transaction. This value must be used togehter with subscription info block in request body, if subscription info block does not present in request, the input chargeType will be ignored. The allowed values are: * customer_initiated: customer initiates the transaction, like first purchase of the subscription order. * merchant_initiated: merchant initiates the transaction, like the upcoming subscription auto renewals. * moto: customer service initiates the transaction, like a Mail Order or Telephone Order

## Response `200`

Successful response.

- CartWithSubscriptionInfo
  - `lineItems` object
    - `lineItem` object[]
      - `subscriptionInfo` object — Basic subscription information related data from an external subscription engine.
        - `autoRenewal` boolean — If true indicates that renewals for this subscription is auto-renewal (as opposed to manual).
        - `terms` string — The terms to the customer for recurring purchases.
        - `freeTrial` boolean — If true indicates this subscription is a free trial.
        - `startTime` string — The start date of subscription in ISO 8601 format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
        - `endTime` string — The end date of subscription in ISO 8601 format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
        - `billingAgreementId` string — Digital River billing agreement ID. It represents the terms the customer agreed to when they stored their card details or chose to apply them to any kind of recurring purchase. The ID of the agreement can then be referenced for subsequent purchases, which gives us the ability to tie them together.
      - `billingOptimization` object — Use the ECO (Expired Card Optimizer) billing optimization tool for a 3rd party subscription.
        - `subscriptionId` string — The ID of the subscription.
        - `segmentId` string — Segment Id of each renewal. Unique for each renewal term, should change after every renewal. The initial acquisition could be thinking as "1" ( thought it doesn’t matter much in initial acquisition), then each renewal thereafter increment from “2” upwards would work. As long as segmentId is the unique id representing each renewal term.
        - `renewalAttempNumber` number — Billing attempt number for current renewal, should reset to 1 after every successful renewal.
    - `customAttributes` object
      - `attribute` object[]
        - `name` string — hasExternalSubscriptionInfo
        - `type` string
        - `value` boolean
    - `chargeType` string — Only visible when chargeType is explicitly provided.

## Other responses

- `400` — * Invalid Request

---

[API](https://skmtc.net/digitalriver/apis/commerce-api-suite-shopper-apis.md) · [All operations](https://skmtc.net/digitalriver/apis/commerce-api-suite-shopper-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalriver/commerce-api-suite-shopper-apis/revisions/4b69392f93b9/schema)
